import React, {
    Component
} from 'react';
import {
    StyleSheet,
    Text,
    View,
    Dimensions,
    ImageBackground,
    AppState,
    Image
} from 'react-native';
import Orientation from 'react-native-orientation';

export default class SpaceScreen extends Component {
    constructor(props) {
        super(props);
        this.state = {
            qainfo:{},
            intervalIndex:""
        };

    }
    static navigationOptions = {
        header: null,
        gesturesEnabled: false,
    };
    componentDidMount() {
        Orientation.lockToLandscape();
        Orientation.lockToLandscape();
        Orientation.lockToLandscape();
        setTimeout(()=>{
            const {navigate} = this.props.navigation
            navigate("AnswearScreen")
        },1000)
    }
    componentWillMount(){
        Orientation.lockToLandscape();
        Orientation.lockToLandscape();
        Orientation.lockToLandscape();
    }
    setAnswearQuest(){
            return(
                <View style={{height:Dimensions.get('window').height,justifyContent:'center',alignItems:'center'}}>
                    <Text style={{fontSize:48}}>请等待主持人出题</Text> 
                </View>
            )
    }
    render() {
        return (
           <View style={[styles.main]}>
                <ImageBackground source={require('./image/mainback.png')} style={{width:Dimensions.get('window').width,height:Dimensions.get('window').height-25}} resizeMode='stretch'>
                    <Image style={styles.topicon} source={require('./image/logo.png')}/>
                    {this.setAnswearQuest()}
                </ImageBackground>
            </View>
        )
    }
}
const styles = StyleSheet.create({
    main:{
        flex: 1,
        backgroundColor:'#ffffff',
    },
    fontFormart:{
        fontSize: 18,
    },
    topicon:{
        height:250,
        width:250,
        position: 'absolute',
        right:-10,
        top:-30,
        zIndex:999
    },
    bottomicon:{
        height:15,
    },
})